home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Demo's / Igor Demo Pro / 1 PutContentsIn Igor Pro Folder / WaveMetrics Procedures / Graphing / SetDecadeLength < prev    next >
Text File  |  1994-02-18  |  900b  |  25 lines

  1. | SetDecadeLength(xInches, yInches)
  2.  
  3. | Assuming the top window is a log/log graph, SetDecadeLength sets the size of the
  4. | graph's plot area such that the length of a decade on the horizontal and vertical axes
  5. | equals xInches and yInches.
  6. | Enter zero for xInches or yInches if you do not want to affect that dimension.
  7.  
  8. Macro SetDecadeLength(xInches, yInches)    | works on top window, assumed to be a log/log graph
  9.     Variable xInches=1.5, yInches=1
  10.     Prompt xInches, " X inches per decade"
  11.     Prompt yInches, " Y inches per decade"
  12.     
  13.     Silent 1;PauseUpdate                    | setting graph size . . .
  14.     
  15.     if (xInches)
  16.         GetAxis /Q bottom                    | puts bottom axis min and max in global variables
  17.         Modify width = (log(V_Max) - log(V_Min)) * xInches * 72
  18.     endif
  19.  
  20.     if (yInches)
  21.         GetAxis /Q left                        | puts left axis min and max in global variables
  22.         Modify height = (log(V_Max) - log(V_Min)) * yInches * 72
  23.     endif
  24. EndMacro
  25.